home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970104-19970326 / 000352_news@columbia.edu _Tue Mar 4 19:22:51 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA08260
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 4 Mar 1997 19:22:50 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA15117
  7.     for kermit.misc@watsun; Tue, 4 Mar 1997 19:22:49 -0500 (EST)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: UNIXLOGIN script???
  12. Date: 5 Mar 1997 00:22:48 GMT
  13. Organization: Columbia University
  14. Lines: 33
  15. Message-ID: <5fieco$lrh$1@apakabar.cc.columbia.edu>
  16. References: <331C9505.26B0@voice-tel.com>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:6689
  19.  
  20. In article <331C9505.26B0@voice-tel.com>,
  21. Nassif T Nassif  <nnassif@voice-tel.com> wrote:
  22. : I am trying to write a script to login to a unix machine: I am using the
  23. : unixlogin in "C-kermit" book page 436. In the book example, the part to
  24. : output the password was omitted but it is fixed in the ckermit.ini file.
  25. :
  26. Good catch -- nobody noticed this before.  Oops!
  27.  
  28. : If I include the macros (NET and UNIXLOGIN) in a script, I was able to
  29. : login, but then the script will exit from the remote host immediately
  30. : after I would get the prompt. I want to be able to login and then
  31. : transfer the control to the user (i.e the keyboard) so whewnever the
  32. : user execute the script he should not worry about login and password.
  33. : here is my code:
  34. : #!/l1/ntn/dev01/kermit/kermit
  35. : take /l1/ntn/dev01/kermit/ckermit.ini ;ini where macros are defined
  36. : NET tcp 193.254.220.1                
  37. : UNIXLOGIN  my_usrid mypasswd
  38. : hangup
  39. : exit 0 
  40. But of course -- you have a HANGUP and an EXIT command in your script.
  41. Do it like this:
  42.  
  43.   take /l1/ntn/dev01/kermit/ckermit.ini ;ini where macros are defined
  44.   NET tcp 193.254.220.1                
  45.   if fail stop 1 Can't make connection
  46.   UNIXLOGIN  my_usrid mypasswd
  47.   if fail stop 1 Login failed
  48.   connect
  49.  
  50. - Frank